package Server.ServerMainFrame.ServerMainFrameView;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTree;
import javax.swing.ListSelectionModel;

import javax.swing.*;
import javax.swing.JButton;

import Server.ServerMainFrame.ServerMainFrameView.*;
import java.awt.GridLayout;

public class ServerMainFrameView 
{
	public JFrame frame;
	public JButton exitButton;

	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String args[]) 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		EventQueue.invokeLater(new Runnable() 
		{
			public void run() 
			{
				try 
				{
					ServerMainFrameView window = new ServerMainFrameView();
					window.frame.setVisible(true);
				} 
				catch (Exception e) 
				{
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application
	 */
	public ServerMainFrameView() 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		createContents();
		
		frame.setVisible(true);
	}

	/**
	 * Initialize the contents of the frame
	 */
	private void createContents() {
		frame = new JFrame();
		frame.setTitle("Server System");
		frame.getContentPane().setLayout(null);
		frame.setBounds(100, 100, 786, 484);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		final JLabel servermainframeLabel = new JLabel();
		servermainframeLabel.setForeground(new Color(0, 0, 255));
		servermainframeLabel.setFont(new Font("", Font.PLAIN, 24));
		servermainframeLabel.setText("ServerMainFrame");
		servermainframeLabel.setBounds(290, 10, 238, 27);
		frame.getContentPane().add(servermainframeLabel);

		final JLabel statusLabel = new JLabel();
		statusLabel.setForeground(new Color(255, 0, 0));
		statusLabel.setFont(new Font("", Font.PLAIN, 22));
		statusLabel.setText("Status:");
		statusLabel.setBounds(0, 13, 81, 21);
		frame.getContentPane().add(statusLabel);

		final JLabel stoppedLabel = new JLabel();
		stoppedLabel.setForeground(new Color(255, 0, 0));
		stoppedLabel.setFont(new Font("", Font.PLAIN, 22));
		stoppedLabel.setText("Stopped");
		stoppedLabel.setBounds(70, 10, 91, 27);
		frame.getContentPane().add(stoppedLabel);

		exitButton = new JButton();
		exitButton.setText("Exit");
		exitButton.setBounds(634, 15, 99, 23);
		frame.getContentPane().add(exitButton);

		final JTabbedPane tabbedPane = new JTabbedPane();
		tabbedPane.setBounds(0, 43, 778, 409);
		frame.getContentPane().add(tabbedPane);

		SitePane sitePanel = new SitePane();
		sitePanel.setLayout(new GridLayout(1, 1));
		tabbedPane.addTab("Sites", null, sitePanel, null);

		TimesPane timesPanel = new TimesPane();
		//timesPanel.setLayout(new GridLayout(1, 1));
		tabbedPane.addTab("Times", null, timesPanel, null);

		LoginsPane loginsPanel = new LoginsPane();
		//loginsPanel.setLayout(new GridLayout(1, 1));
		tabbedPane.addTab("Logins", null, loginsPanel, null);

		ConnectionsPane ConnectionsPanel = new ConnectionsPane();
		ConnectionsPanel.setLayout(new GridLayout(1, 1));
		tabbedPane.addTab("Connections", null, ConnectionsPanel, null);

		final JPanel panel_4 = new JPanel();
		tabbedPane.addTab("Reports", null, panel_4, null);

		final JPanel panel_5 = new JPanel();
		tabbedPane.addTab("About", null, panel_5, null);
	}

}
